import angular from 'angular';
import './js/zhx.media.review';
import './data/mock-data';
/**
 * Demo Test for zhx.media.review plugin
 * Author : Vicco Wang
 * Date : 2017/07/18
 */

const demoApp = angular.module('demoApp',['zhx.media.review']);

demoApp.controller('demoCtrl',['$scope','$http',($scope,$http)=>{

    const size = 850;

    /**
     * zhx.media.review test options
     * @type {{data: Array}}
     */
    $scope.mediaReviewOpts = {
        /**
         * 播放数据
         * - 图片(组)
         * - 视频,
         * - 模板数据
         */
        data : null,
        baseSize : {
            width: size,
            height: size * 9 /16
        }
    };

    $http.get('mediaReviewData/getData').then((data)=>{
        console.log(data);
        $scope.mediaReviewOpts.data = data.data;
    })


}]);